fetcher: Track outstanding requests with a table
authorMatthew Barnes <mbarnes@redhat.com>
Wed, 23 Sep 2015 23:28:47 +0000 (19:28 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Thu, 24 Sep 2015 14:01:01 +0000 (10:01 -0400)
commite21188a24568a884c4a0b192dc2dc48a571b98b2
tree44c3b9635c41d6065c7875108172969ed3e698fd
parent771075d319ccf68659f1e1db8a925c430788c988
fetcher: Track outstanding requests with a table

Track outstanding HTTP requests in a table for easier debugging.

Also fixes a bug discussed in https://bugzilla.gnome.org/755224
where the outstanding request counter was not decremented in the
event of an error, which could result in the fetcher hitting its
max request limit and locking up.

The bug is fixed by removing the request struct from the table in
pending_uri_free(), which is always called regardless of error,
so the outstanding request count is always accurate.
src/libostree/ostree-fetcher.c